package com.ifengchao.job;

import com.ifengchao.service.DealReptileService;
import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author YiMing
 * @Description:
 * @Date: Created in 下午2:07 2017/9/11
 * @Modified By
 */
@Component("DealReptileJob")
public class DealReptileJob {

	private static final Logger logger = Logger.getLogger(DealReptileJob.class);

	@Autowired(required = false)
	private DealReptileService dealReptileService;

	/**
	 * 爬取Web网页数据逻辑
	 */
	public void executeTask() {
		System.out.println("-----进入爬取Web网页数据逻辑Job------");
		logger.info("-----进入爬取Web网页数据逻辑Job------");
		try {
			dealReptileService.getData();
		} catch (Exception e) {
			logger.error("爬取Web网页数据逻辑出错：", e);
		}
	}
}
